﻿@{Lang lang = ViewBag.Lang;}
@{
    ViewBag.Title = lang.SETTING;
    Layout = "~/Views/Shared/_LayoutMember.cshtml";
    DataHelper.Setting[] lstSetting = ViewBag.Settings;
}

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="fa fa-external-link-square"></i>@lang.SETTING
        <div class="panel-tools">
            <a class="btn btn-xs btn-link panel-collapse collapses" href="#"></a><a class="btn btn-xs btn-link panel-config"
                href="#panel-config" data-toggle="modal"><i class="fa fa-wrench"></i></a><a class="btn btn-xs btn-link panel-refresh"
                    href="#"><i class="fa fa-refresh"></i></a><a class="btn btn-xs btn-link panel-expand"
                        href="#"><i class="fa fa-resize-full"></i></a><a class="btn btn-xs btn-link panel-close"
                            href="#"><i class="fa fa-times"></i></a>
        </div>
    </div>
    <div class="panel-body">
        <form method="post">
        <table id="divSetting" class="table table-hover">
            <tr>
                <th>@lang.NAME
                </th>
                <th>@lang.VALUE
                </th>
                <th>@lang.DESCRIPTION
                </th>
                <th>@lang.LASTUPDATED
                </th>
            </tr>
            @{
                for (int i = 0; i < lstSetting.Length; i++)
                {
                <tr>
                    <td style="width: 150px;">
                        @lstSetting[i].Name
                    </td>
                    <td style="width: 300px;">
                        <input name="lstSetting[@i].Value" value="@lstSetting[i].Value"  style="width: 250px;"/>
                        <input name="lstSetting[@i].Name" value="@lstSetting[i].Name" type="hidden"/>
                    </td>
                    <td style="width: 350px;">
                        @lstSetting[i].Description
                    </td>
                    <td style="width: 150px;">
                        @(lstSetting[i].Updatedate.HasValue ? lstSetting[i].Updatedate.Value.ToString("HH:mm dd/MM/yyyy") : "")
                    </td>
                </tr>
                }
                <tr>
                    <td>
                    </td>
                    <td>
                        <input type="submit" />
                        <td>
                        </td>
                        <td>
                        </td>
                    </td>
                </tr>
            }
        </table>
        </form>
        @Html.Partial("UserControl/OnDisplayPaggingAdmin")
    </div>
</div>
